{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f7ec81a0",
   "metadata": {},
   "source": [
    "## 初识地图\n",
    "\n",
    "1.地图API简介               \n",
    "2."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "798009fb",
   "metadata": {},
   "source": [
    "## Web服务API简介"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b49c6602",
   "metadata": {},
   "source": [
    "### 地理/逆地理编码\n",
    "> 结构化地址：\n",
    " 首先，地址肯定是一串字符，内含国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦等建筑物名称。按照由大区域名称到小区域名称组合在一起的字符。一个有效的地址应该是独一无二的。注意：针对大陆、港、澳地区的地理编码转换时可以将国家信息选择性的忽略，但省、市、城镇等级别的地址构成是不能忽略的。暂时不支持返回台湾省的详细地址信息。\n",
    " \n",
    "> 地理编码：将详细的结构化地址转换为高德经纬度坐标。且支持对地标性名胜景区、建筑物名称解析为高德经纬度坐标。\n",
    "结构化地址举例：北京市朝阳区阜通东大街6号转换后经纬度：116.480881,39.989410\n",
    "地标性建筑举例：天安门转换后经纬度：116.397499,39.908722             \n",
    "\n",
    "> 逆地理编码：将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息。\n",
    "例如：116.480881,39.989410 转换地址描述后：北京市朝阳区阜通东大街6号\n",
    "\n",
    "> 地理编码/逆地理编码 API 是通过 HTTP/HTTPS 协议访问远程服务的接口，提供结构化地址与经纬度之间的相互转化的能力。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "97ad6fee",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 地理编码\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"address\":\"广东省广州市从化区广州南方学院\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=geo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "45cebd9e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "217effd1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区温泉镇中心大学南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.678280,23.628439',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "71be5032",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.678280,23.628439'"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广州南方学院_location = r.json()[ 'geocodes'][0]['location']\n",
    "广州南方学院_location"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bc6cad98",
   "metadata": {},
   "source": [
    "### 逆地理编码\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "497ff039",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 逆地理编码\n",
    "# extensions = all\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v3/geocode/regeo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"location\":广州南方学院_location\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=regeo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "22a24ffe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "6a31a57b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117100000',\n",
       "   'streetNumber': {'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "dc6a7dad",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 逆地理编码\n",
    "# extensions = all\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v3/geocode/regeo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"location\":广州南方学院_location,\n",
    "    \"extensions\" :\"all\",\n",
    "    \"poitype\":\"true\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=regeo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "95e02c91",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "ccd997e3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'regeocode': {'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院',\n",
       "  'addressComponent': {'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'city': '广州市',\n",
       "   'citycode': '020',\n",
       "   'district': '从化区',\n",
       "   'adcode': '440117',\n",
       "   'township': '温泉镇',\n",
       "   'towncode': '440117100000',\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'streetNumber': {'street': '博学路',\n",
       "    'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943'},\n",
       "   'businessAreas': [[]]},\n",
       "  'pois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': '020-87828988;020-61787331',\n",
       "    'direction': '北',\n",
       "    'distance': '470.792',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.450402',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG4TAF2',\n",
       "    'name': '广州南方公寓',\n",
       "    'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "    'tel': '13622768437',\n",
       "    'direction': '东南',\n",
       "    'distance': '102.617',\n",
       "    'location': '113.678983,23.627778',\n",
       "    'address': '温泉镇乌土村松浪队5号(近博学路)',\n",
       "    'poiweight': '0.237309',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H6FA18J5',\n",
       "    'name': '保利半山花园',\n",
       "    'type': '商务住宅;住宅区;住宅区',\n",
       "    'tel': [],\n",
       "    'direction': '东南',\n",
       "    'distance': '139.054',\n",
       "    'location': '113.679358,23.627672',\n",
       "    'address': '从莞深高速(广州南方学院南侧)',\n",
       "    'poiweight': '0.223065',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B00140TWHT',\n",
       "    'name': '教工住宅1号',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '222.658',\n",
       "    'location': '113.678490,23.630432',\n",
       "    'address': '笃行路2',\n",
       "    'poiweight': '0.157653',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHRJDM9',\n",
       "    'name': '中南公寓',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': '13711245345',\n",
       "    'direction': '东南',\n",
       "    'distance': '231.223',\n",
       "    'location': '113.680340,23.627566',\n",
       "    'address': '中大南方学院南门1号',\n",
       "    'poiweight': '0.256152',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD588HJ',\n",
       "    'name': '广州南方学院教学楼4号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '242.901',\n",
       "    'location': '113.677460,23.630490',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHZH0IK',\n",
       "    'name': '地下铁',\n",
       "    'type': '餐饮服务;冷饮店;冷饮店',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '74.1376',\n",
       "    'location': '113.677941,23.629029',\n",
       "    'address': '博学路广州南方学院综合楼内',\n",
       "    'poiweight': '0.17934',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU76L2',\n",
       "    'name': '广州南方学院2号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '280.003',\n",
       "    'location': '113.678211,23.630956',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP838K',\n",
       "    'name': '教学楼3号(外国语学院)',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '298.093',\n",
       "    'location': '113.677247,23.630947',\n",
       "    'address': '博学路25',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKSF1FI',\n",
       "    'name': '香辣螺蛳粉',\n",
       "    'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "    'tel': '17820061022',\n",
       "    'direction': '西',\n",
       "    'distance': '209.206',\n",
       "    'location': '113.676231,23.628565',\n",
       "    'address': '广州南方学院西4123',\n",
       "    'poiweight': '0.209252',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU8NLD',\n",
       "    'name': '广州南方学院1号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '326.007',\n",
       "    'location': '113.678215,23.631370',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLF90I2',\n",
       "    'name': '煌上煌酱鸭(南方学院店)',\n",
       "    'type': '餐饮服务;快餐厅;快餐厅',\n",
       "    'tel': '13712317721',\n",
       "    'direction': '东北',\n",
       "    'distance': '256.772',\n",
       "    'location': '113.679965,23.630156',\n",
       "    'address': '笃行路20、22、24号广州南方学院商业中心1层1F015',\n",
       "    'poiweight': '0.209448',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58UTU',\n",
       "    'name': '广州南方学院2号教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '346.352',\n",
       "    'location': '113.677060,23.631346',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H25SMRKP',\n",
       "    'name': '广州南方学院大礼堂',\n",
       "    'type': '科教文化服务;会展中心;会展中心',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '386.65',\n",
       "    'location': '113.680076,23.631502',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.261624',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JD',\n",
       "    'name': '广州南方学院教学楼1号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '391.548',\n",
       "    'location': '113.677077,23.631783',\n",
       "    'address': '博学路19号',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD592BJ',\n",
       "    'name': '广州南方学院综合楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '392.731',\n",
       "    'location': '113.680117,23.631544',\n",
       "    'address': '温泉大道886号广州南方学院内',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP81F0',\n",
       "    'name': '教学楼1号(文学与传媒学院)',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '393.93',\n",
       "    'location': '113.676866,23.631736',\n",
       "    'address': '博学路19号附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLBEOND',\n",
       "    'name': '聚贤楼10号',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '418.51',\n",
       "    'location': '113.681253,23.631036',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.190963',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFH6K3U9',\n",
       "    'name': '广州中大南方招待所',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '020-61787222',\n",
       "    'direction': '西北',\n",
       "    'distance': '378.102',\n",
       "    'location': '113.676330,23.631332',\n",
       "    'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "    'poiweight': '0.254885',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58NF8',\n",
       "    'name': '广州南方学院达人书院',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '446.366',\n",
       "    'location': '113.679041,23.632392',\n",
       "    'address': '温泉大道882号广州南方学院新综合楼2层',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKUVYWV',\n",
       "    'name': '广州和风庭阿七度假别墅',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '424.35',\n",
       "    'location': '113.681736,23.630569',\n",
       "    'address': '保利桃花源',\n",
       "    'poiweight': '0.273168',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU99RM',\n",
       "    'name': '广州南方学院图书馆',\n",
       "    'type': '科教文化服务;图书馆;图书馆',\n",
       "    'tel': '020-61787368;020-61787371',\n",
       "    'direction': '北',\n",
       "    'distance': '489.331',\n",
       "    'location': '113.679177,23.632762',\n",
       "    'address': '温泉大道882号广州南方学院内',\n",
       "    'poiweight': '0.257947',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JC',\n",
       "    'name': '广州南方学院4号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '498.883',\n",
       "    'location': '113.679963,23.632652',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFL7C054',\n",
       "    'name': '广州U优森特酒店',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '15813395296',\n",
       "    'direction': '北',\n",
       "    'distance': '464.819',\n",
       "    'location': '113.679226,23.632528',\n",
       "    'address': '温泉镇博学路882号(广州南方学院商业中心1层)',\n",
       "    'poiweight': '0.317505',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG8CSEK',\n",
       "    'name': 'L5员工宿舍',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '554.129',\n",
       "    'location': '113.682583,23.631487',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.185371',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58FR2',\n",
       "    'name': '广州南方学院教学楼9号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '532.163',\n",
       "    'location': '113.679747,23.633032',\n",
       "    'address': '广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HG5Z9JNK',\n",
       "    'name': '广州南方学院教学楼7号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '544.868',\n",
       "    'location': '113.678600,23.633330',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221553',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD599JM',\n",
       "    'name': '广州南方学院第11教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '556.036',\n",
       "    'location': '113.680037,23.633173',\n",
       "    'address': '温泉大道882号广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0GUJYPEG2',\n",
       "    'name': '怒烤烤串(从化店)',\n",
       "    'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '510.112',\n",
       "    'location': '113.677160,23.632910',\n",
       "    'address': '温泉大道882号广州南方学院内博学路6号之3',\n",
       "    'poiweight': '0.216026',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU6Z41',\n",
       "    'name': '广州南方学院教学楼6号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '586.331',\n",
       "    'location': '113.678424,23.633710',\n",
       "    'address': '温泉大道882',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []}],\n",
       "  'roads': [{'id': '020F49F0050461206',\n",
       "    'name': '博学路',\n",
       "    'direction': '北',\n",
       "    'distance': '7.63232',\n",
       "    'location': '113.678,23.6284'},\n",
       "   {'id': '020F49F0050462229',\n",
       "    'name': '老虎形街',\n",
       "    'direction': '北',\n",
       "    'distance': '445.159',\n",
       "    'location': '113.679,23.6245'},\n",
       "   {'id': '020F49F0050462451',\n",
       "    'name': '中山路',\n",
       "    'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.677,23.6347'}],\n",
       "  'roadinters': [{'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.676794,23.634661',\n",
       "    'first_id': '020F49F0050461206',\n",
       "    'first_name': '博学路',\n",
       "    'second_id': '020F49F0050462451',\n",
       "    'second_name': '中山路'}],\n",
       "  'aois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'adcode': '440117',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'area': '528560.656426',\n",
       "    'distance': '0',\n",
       "    'type': '141201'}]}}"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "3bc51bdc",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "c65bd905",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>tel</th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>businessarea</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>020-87828988;020-61787331</td>\n",
       "      <td>北</td>\n",
       "      <td>470.792</td>\n",
       "      <td>113.679257,23.632577</td>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>0.450402</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFG4TAF2</td>\n",
       "      <td>广州南方公寓</td>\n",
       "      <td>商务住宅;商务住宅相关;商务住宅相关</td>\n",
       "      <td>13622768437</td>\n",
       "      <td>东南</td>\n",
       "      <td>102.617</td>\n",
       "      <td>113.678983,23.627778</td>\n",
       "      <td>温泉镇乌土村松浪队5号(近博学路)</td>\n",
       "      <td>0.237309</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0H6FA18J5</td>\n",
       "      <td>保利半山花园</td>\n",
       "      <td>商务住宅;住宅区;住宅区</td>\n",
       "      <td>[]</td>\n",
       "      <td>东南</td>\n",
       "      <td>139.054</td>\n",
       "      <td>113.679358,23.627672</td>\n",
       "      <td>从莞深高速(广州南方学院南侧)</td>\n",
       "      <td>0.223065</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B00140TWHT</td>\n",
       "      <td>教工住宅1号</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>222.658</td>\n",
       "      <td>113.678490,23.630432</td>\n",
       "      <td>笃行路2</td>\n",
       "      <td>0.157653</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFHRJDM9</td>\n",
       "      <td>中南公寓</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>13711245345</td>\n",
       "      <td>东南</td>\n",
       "      <td>231.223</td>\n",
       "      <td>113.680340,23.627566</td>\n",
       "      <td>中大南方学院南门1号</td>\n",
       "      <td>0.256152</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0HGD588HJ</td>\n",
       "      <td>广州南方学院教学楼4号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>242.901</td>\n",
       "      <td>113.677460,23.630490</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFHZH0IK</td>\n",
       "      <td>地下铁</td>\n",
       "      <td>餐饮服务;冷饮店;冷饮店</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>74.1376</td>\n",
       "      <td>113.677941,23.629029</td>\n",
       "      <td>博学路广州南方学院综合楼内</td>\n",
       "      <td>0.17934</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0HGDU76L2</td>\n",
       "      <td>广州南方学院2号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>280.003</td>\n",
       "      <td>113.678211,23.630956</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFKP838K</td>\n",
       "      <td>教学楼3号(外国语学院)</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>298.093</td>\n",
       "      <td>113.677247,23.630947</td>\n",
       "      <td>博学路25</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFKSF1FI</td>\n",
       "      <td>香辣螺蛳粉</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>17820061022</td>\n",
       "      <td>西</td>\n",
       "      <td>209.206</td>\n",
       "      <td>113.676231,23.628565</td>\n",
       "      <td>广州南方学院西4123</td>\n",
       "      <td>0.209252</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0HGDU8NLD</td>\n",
       "      <td>广州南方学院1号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>326.007</td>\n",
       "      <td>113.678215,23.631370</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFLF90I2</td>\n",
       "      <td>煌上煌酱鸭(南方学院店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>13712317721</td>\n",
       "      <td>东北</td>\n",
       "      <td>256.772</td>\n",
       "      <td>113.679965,23.630156</td>\n",
       "      <td>笃行路20、22、24号广州南方学院商业中心1层1F015</td>\n",
       "      <td>0.209448</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0HGD58UTU</td>\n",
       "      <td>广州南方学院2号教学楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>346.352</td>\n",
       "      <td>113.677060,23.631346</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.191229</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0H25SMRKP</td>\n",
       "      <td>广州南方学院大礼堂</td>\n",
       "      <td>科教文化服务;会展中心;会展中心</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>386.65</td>\n",
       "      <td>113.680076,23.631502</td>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>0.261624</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0HGDU92JD</td>\n",
       "      <td>广州南方学院教学楼1号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>391.548</td>\n",
       "      <td>113.677077,23.631783</td>\n",
       "      <td>博学路19号</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0HGD592BJ</td>\n",
       "      <td>广州南方学院综合楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>392.731</td>\n",
       "      <td>113.680117,23.631544</td>\n",
       "      <td>温泉大道886号广州南方学院内</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFKP81F0</td>\n",
       "      <td>教学楼1号(文学与传媒学院)</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>393.93</td>\n",
       "      <td>113.676866,23.631736</td>\n",
       "      <td>博学路19号附近</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFLBEOND</td>\n",
       "      <td>聚贤楼10号</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>418.51</td>\n",
       "      <td>113.681253,23.631036</td>\n",
       "      <td>从莞深高速(广州南方学院)</td>\n",
       "      <td>0.190963</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFH6K3U9</td>\n",
       "      <td>广州中大南方招待所</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>020-61787222</td>\n",
       "      <td>西北</td>\n",
       "      <td>378.102</td>\n",
       "      <td>113.676330,23.631332</td>\n",
       "      <td>温泉镇温泉大道882号广州南方学院H7栋1-5层</td>\n",
       "      <td>0.254885</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0HGD58NF8</td>\n",
       "      <td>广州南方学院达人书院</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>446.366</td>\n",
       "      <td>113.679041,23.632392</td>\n",
       "      <td>温泉大道882号广州南方学院新综合楼2层</td>\n",
       "      <td>0.191229</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B0FFKUVYWV</td>\n",
       "      <td>广州和风庭阿七度假别墅</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>424.35</td>\n",
       "      <td>113.681736,23.630569</td>\n",
       "      <td>保利桃花源</td>\n",
       "      <td>0.273168</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B0HGDU99RM</td>\n",
       "      <td>广州南方学院图书馆</td>\n",
       "      <td>科教文化服务;图书馆;图书馆</td>\n",
       "      <td>020-61787368;020-61787371</td>\n",
       "      <td>北</td>\n",
       "      <td>489.331</td>\n",
       "      <td>113.679177,23.632762</td>\n",
       "      <td>温泉大道882号广州南方学院内</td>\n",
       "      <td>0.257947</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B0HGDU92JC</td>\n",
       "      <td>广州南方学院4号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>498.883</td>\n",
       "      <td>113.679963,23.632652</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B0FFL7C054</td>\n",
       "      <td>广州U优森特酒店</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>15813395296</td>\n",
       "      <td>北</td>\n",
       "      <td>464.819</td>\n",
       "      <td>113.679226,23.632528</td>\n",
       "      <td>温泉镇博学路882号(广州南方学院商业中心1层)</td>\n",
       "      <td>0.317505</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B0FFG8CSEK</td>\n",
       "      <td>L5员工宿舍</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>554.129</td>\n",
       "      <td>113.682583,23.631487</td>\n",
       "      <td>从莞深高速(广州南方学院)</td>\n",
       "      <td>0.185371</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B0HGD58FR2</td>\n",
       "      <td>广州南方学院教学楼9号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>532.163</td>\n",
       "      <td>113.679747,23.633032</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B0HG5Z9JNK</td>\n",
       "      <td>广州南方学院教学楼7号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>544.868</td>\n",
       "      <td>113.678600,23.633330</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221553</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0HGD599JM</td>\n",
       "      <td>广州南方学院第11教学楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>556.036</td>\n",
       "      <td>113.680037,23.633173</td>\n",
       "      <td>温泉大道882号广州南方学院</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B0GUJYPEG2</td>\n",
       "      <td>怒烤烤串(从化店)</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>510.112</td>\n",
       "      <td>113.677160,23.632910</td>\n",
       "      <td>温泉大道882号广州南方学院内博学路6号之3</td>\n",
       "      <td>0.216026</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B0HGDU6Z41</td>\n",
       "      <td>广州南方学院教学楼6号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>586.331</td>\n",
       "      <td>113.678424,23.633710</td>\n",
       "      <td>温泉大道882</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id            name                  type  \\\n",
       "0   B00140MR9A          广州南方学院        科教文化服务;学校;高等院校   \n",
       "1   B0FFG4TAF2          广州南方公寓    商务住宅;商务住宅相关;商务住宅相关   \n",
       "2   B0H6FA18J5          保利半山花园          商务住宅;住宅区;住宅区   \n",
       "3   B00140TWHT          教工住宅1号         商务住宅;住宅区;住宅小区   \n",
       "4   B0FFHRJDM9            中南公寓         商务住宅;住宅区;住宅小区   \n",
       "5   B0HGD588HJ     广州南方学院教学楼4号          科教文化服务;学校;学校   \n",
       "6   B0FFHZH0IK             地下铁          餐饮服务;冷饮店;冷饮店   \n",
       "7   B0HGDU76L2     广州南方学院2号实验楼          科教文化服务;学校;学校   \n",
       "8   B0FFKP838K    教学楼3号(外国语学院)        科教文化服务;学校;高等院校   \n",
       "9   B0FFKSF1FI           香辣螺蛳粉      餐饮服务;餐饮相关场所;餐饮相关   \n",
       "10  B0HGDU8NLD     广州南方学院1号实验楼          科教文化服务;学校;学校   \n",
       "11  B0FFLF90I2    煌上煌酱鸭(南方学院店)          餐饮服务;快餐厅;快餐厅   \n",
       "12  B0HGD58UTU     广州南方学院2号教学楼          科教文化服务;学校;学校   \n",
       "13  B0H25SMRKP       广州南方学院大礼堂      科教文化服务;会展中心;会展中心   \n",
       "14  B0HGDU92JD     广州南方学院教学楼1号          科教文化服务;学校;学校   \n",
       "15  B0HGD592BJ       广州南方学院综合楼          科教文化服务;学校;学校   \n",
       "16  B0FFKP81F0  教学楼1号(文学与传媒学院)  科教文化服务;科教文化场所;科教文化场所   \n",
       "17  B0FFLBEOND          聚贤楼10号           商务住宅;住宅区;宿舍   \n",
       "18  B0FFH6K3U9       广州中大南方招待所    住宿服务;住宿服务相关;住宿服务相关   \n",
       "19  B0HGD58NF8      广州南方学院达人书院  科教文化服务;科教文化场所;科教文化场所   \n",
       "20  B0FFKUVYWV     广州和风庭阿七度假别墅    住宿服务;住宿服务相关;住宿服务相关   \n",
       "21  B0HGDU99RM       广州南方学院图书馆        科教文化服务;图书馆;图书馆   \n",
       "22  B0HGDU92JC     广州南方学院4号实验楼          科教文化服务;学校;学校   \n",
       "23  B0FFL7C054        广州U优森特酒店    住宿服务;住宿服务相关;住宿服务相关   \n",
       "24  B0FFG8CSEK          L5员工宿舍           商务住宅;住宅区;宿舍   \n",
       "25  B0HGD58FR2     广州南方学院教学楼9号          科教文化服务;学校;学校   \n",
       "26  B0HG5Z9JNK     广州南方学院教学楼7号          科教文化服务;学校;学校   \n",
       "27  B0HGD599JM    广州南方学院第11教学楼          科教文化服务;学校;学校   \n",
       "28  B0GUJYPEG2       怒烤烤串(从化店)    餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "29  B0HGDU6Z41     广州南方学院教学楼6号          科教文化服务;学校;学校   \n",
       "\n",
       "                          tel direction distance              location  \\\n",
       "0   020-87828988;020-61787331         北  470.792  113.679257,23.632577   \n",
       "1                 13622768437        东南  102.617  113.678983,23.627778   \n",
       "2                          []        东南  139.054  113.679358,23.627672   \n",
       "3                          []         北  222.658  113.678490,23.630432   \n",
       "4                 13711245345        东南  231.223  113.680340,23.627566   \n",
       "5                          []         北  242.901  113.677460,23.630490   \n",
       "6                          []        西北  74.1376  113.677941,23.629029   \n",
       "7                          []         北  280.003  113.678211,23.630956   \n",
       "8                          []         北  298.093  113.677247,23.630947   \n",
       "9                 17820061022         西  209.206  113.676231,23.628565   \n",
       "10                         []         北  326.007  113.678215,23.631370   \n",
       "11                13712317721        东北  256.772  113.679965,23.630156   \n",
       "12                         []        西北  346.352  113.677060,23.631346   \n",
       "13                         []        东北   386.65  113.680076,23.631502   \n",
       "14                         []         北  391.548  113.677077,23.631783   \n",
       "15                         []        东北  392.731  113.680117,23.631544   \n",
       "16                         []        西北   393.93  113.676866,23.631736   \n",
       "17                         []        东北   418.51  113.681253,23.631036   \n",
       "18               020-61787222        西北  378.102  113.676330,23.631332   \n",
       "19                         []         北  446.366  113.679041,23.632392   \n",
       "20                         []        东北   424.35  113.681736,23.630569   \n",
       "21  020-61787368;020-61787371         北  489.331  113.679177,23.632762   \n",
       "22                         []         北  498.883  113.679963,23.632652   \n",
       "23                15813395296         北  464.819  113.679226,23.632528   \n",
       "24                         []        东北  554.129  113.682583,23.631487   \n",
       "25                         []         北  532.163  113.679747,23.633032   \n",
       "26                         []         北  544.868  113.678600,23.633330   \n",
       "27                         []         北  556.036  113.680037,23.633173   \n",
       "28                         []         北  510.112  113.677160,23.632910   \n",
       "29                         []         北  586.331  113.678424,23.633710   \n",
       "\n",
       "                          address poiweight businessarea  \n",
       "0                        温泉大道882号  0.450402           []  \n",
       "1               温泉镇乌土村松浪队5号(近博学路)  0.237309           []  \n",
       "2                 从莞深高速(广州南方学院南侧)  0.223065           []  \n",
       "3                            笃行路2  0.157653           []  \n",
       "4                      中大南方学院南门1号  0.256152           []  \n",
       "5                             博学路  0.221662           []  \n",
       "6                   博学路广州南方学院综合楼内   0.17934           []  \n",
       "7                             博学路  0.221662           []  \n",
       "8                           博学路25  0.191742           []  \n",
       "9                     广州南方学院西4123  0.209252           []  \n",
       "10                          博学路附近  0.221662           []  \n",
       "11  笃行路20、22、24号广州南方学院商业中心1层1F015  0.209448           []  \n",
       "12                            博学路  0.191229           []  \n",
       "13                       温泉大道882号  0.261624           []  \n",
       "14                         博学路19号  0.221662           []  \n",
       "15                温泉大道886号广州南方学院内  0.221662           []  \n",
       "16                       博学路19号附近  0.191742           []  \n",
       "17                  从莞深高速(广州南方学院)  0.190963           []  \n",
       "18       温泉镇温泉大道882号广州南方学院H7栋1-5层  0.254885           []  \n",
       "19           温泉大道882号广州南方学院新综合楼2层  0.191229           []  \n",
       "20                          保利桃花源  0.273168           []  \n",
       "21                温泉大道882号广州南方学院内  0.257947           []  \n",
       "22                          博学路附近  0.221662           []  \n",
       "23       温泉镇博学路882号(广州南方学院商业中心1层)  0.317505           []  \n",
       "24                  从莞深高速(广州南方学院)  0.185371           []  \n",
       "25                         广州南方学院  0.221662           []  \n",
       "26                            博学路  0.221553           []  \n",
       "27                 温泉大道882号广州南方学院  0.221662           []  \n",
       "28         温泉大道882号广州南方学院内博学路6号之3  0.216026           []  \n",
       "29                        温泉大道882  0.221662           []  "
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "81180ba9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 地理编码\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"address\":\"广州中医药大学\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=geo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "73f1b3c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市番禺区广州中医药大学',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '番禺区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440113',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.402720,23.056325',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "ce65973d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.402720,23.056325'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广州中医药大学_location = r.json()[ 'geocodes'][0]['location']\n",
    "广州中医药大学_location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cf457824",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 逆地理编码\n",
    "# extensions = all\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v3/geocode/regeo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"location\":广州中医药大学_location,\n",
    "    \"extensions\" :\"all\",\n",
    "    \"poitype\":\"true\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=regeo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "b13ad739",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "2b020691",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>tel</th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>businessarea</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B00140UDXU</td>\n",
       "      <td>广州中医药大学(大学城校区)</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>020-39358050;020-39358233</td>\n",
       "      <td>东北</td>\n",
       "      <td>297.221</td>\n",
       "      <td>113.404592,23.058369</td>\n",
       "      <td>大学城外环东路232号</td>\n",
       "      <td>0.677618</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B00141JRJV</td>\n",
       "      <td>广州中医药大学大会堂</td>\n",
       "      <td>科教文化服务;会展中心;会展中心</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>266.086</td>\n",
       "      <td>113.404911,23.057614</td>\n",
       "      <td>大学城外环东路232号</td>\n",
       "      <td>0.188565</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B00141SYS5</td>\n",
       "      <td>广东药科大学学生活动中心</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>78.5893</td>\n",
       "      <td>113.402223,23.055786</td>\n",
       "      <td>大学城中二横路</td>\n",
       "      <td>0.27583</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFFDC8NS</td>\n",
       "      <td>广东药科大学学生会</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>78.5893</td>\n",
       "      <td>113.402223,23.055786</td>\n",
       "      <td>大学城广药路附近</td>\n",
       "      <td>0.28068</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFFDCP1F</td>\n",
       "      <td>广东药科大学学生社团联合会</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>78.5893</td>\n",
       "      <td>113.402223,23.055786</td>\n",
       "      <td>大学城广药路附近</td>\n",
       "      <td>0.28068</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFG9ISNR</td>\n",
       "      <td>广州中医药大学大学城校区教师公寓A号楼</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>124.777</td>\n",
       "      <td>113.402107,23.057295</td>\n",
       "      <td>大学城中环东路77附近</td>\n",
       "      <td>0.246851</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B00141JVHV</td>\n",
       "      <td>广州中医药大学大学城校区-卫管楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>269.431</td>\n",
       "      <td>113.403311,23.058686</td>\n",
       "      <td>大学城外环东路232号</td>\n",
       "      <td>0.209138</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFH6XMU2</td>\n",
       "      <td>广东药科大学学生工作部(处)心理健康中心</td>\n",
       "      <td>医疗保健服务;医疗保健服务场所;医疗保健服务场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>78.26</td>\n",
       "      <td>113.402223,23.055790</td>\n",
       "      <td>大学城中环东路与玉兰路交叉口西南约200米</td>\n",
       "      <td>0.188695</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFFDCP2M</td>\n",
       "      <td>广东药科大学针灸协会</td>\n",
       "      <td>政府机构及社会团体;社会团体;行业协会</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>100.381</td>\n",
       "      <td>113.401954,23.055761</td>\n",
       "      <td>大学城广东药科大学学生活动中心206</td>\n",
       "      <td>0.141431</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFFDAS2Q</td>\n",
       "      <td>广州中医药大学创业实践园</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>13059130491</td>\n",
       "      <td>西</td>\n",
       "      <td>182.352</td>\n",
       "      <td>113.400943,23.056451</td>\n",
       "      <td>大学城广中医路与大学城中环东路交叉口南约220米</td>\n",
       "      <td>0.28068</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0FFG8TZWO</td>\n",
       "      <td>广州中医药大学马克思主义学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>319.189</td>\n",
       "      <td>113.402315,23.059171</td>\n",
       "      <td>大学城中环东路与大学城广中医路交叉口东约120米</td>\n",
       "      <td>0.283869</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B00141JUXV</td>\n",
       "      <td>广州中医药大学大学城校区人文社科学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>327.519</td>\n",
       "      <td>113.402479,23.059262</td>\n",
       "      <td>广州大学城外环东路232号</td>\n",
       "      <td>0.27583</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B00140HFZN</td>\n",
       "      <td>广州中医药大学第一饭堂</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>13509012621;020-39356188</td>\n",
       "      <td>西</td>\n",
       "      <td>150.692</td>\n",
       "      <td>113.401334,23.056783</td>\n",
       "      <td>大学城中环东路123号广州中医药大学二饭1-3层</td>\n",
       "      <td>0.25528</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0FFK6RT3G</td>\n",
       "      <td>广州中医药大学大学城校区青创空间</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西</td>\n",
       "      <td>175.23</td>\n",
       "      <td>113.401013,23.056453</td>\n",
       "      <td>大学城广中医路与大学城中环东路交叉口南约220米</td>\n",
       "      <td>0.289618</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0FFIORIR8</td>\n",
       "      <td>广州中医药大学大学城校区学生宿舍1号楼</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>西</td>\n",
       "      <td>187.058</td>\n",
       "      <td>113.401039,23.056986</td>\n",
       "      <td>大学城广中医路广州中医药大学大学城校区西北2门东南侧约70米</td>\n",
       "      <td>0.242906</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFF5UZYL</td>\n",
       "      <td>广州中医药大学大学城校区-人文楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>318.623</td>\n",
       "      <td>113.402316,23.059166</td>\n",
       "      <td>大学城外环东路232号</td>\n",
       "      <td>0.278599</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFG6LB3E</td>\n",
       "      <td>大湴村</td>\n",
       "      <td>地名地址信息;普通地名;村庄级地名</td>\n",
       "      <td>[]</td>\n",
       "      <td>西南</td>\n",
       "      <td>236.507</td>\n",
       "      <td>113.401099,23.054809</td>\n",
       "      <td>番禺区</td>\n",
       "      <td>0.395663</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFJPULWW</td>\n",
       "      <td>广药海洋研究所</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>南</td>\n",
       "      <td>188.755</td>\n",
       "      <td>113.402123,23.054719</td>\n",
       "      <td>大学城广药路附近</td>\n",
       "      <td>0.191617</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B00141TWZO</td>\n",
       "      <td>广州中医药大学大学城中医门诊部</td>\n",
       "      <td>医疗保健服务;诊所;诊所</td>\n",
       "      <td>[]</td>\n",
       "      <td>西</td>\n",
       "      <td>141.535</td>\n",
       "      <td>113.401365,23.056069</td>\n",
       "      <td>广州大学城外环东路232号</td>\n",
       "      <td>0.222269</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFG8U010</td>\n",
       "      <td>广州中医药大学深圳临床医学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>346.202</td>\n",
       "      <td>113.403350,23.059384</td>\n",
       "      <td>大学城香樟路与大学城芒果路交叉口西南约60米</td>\n",
       "      <td>0.283869</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B0FFGNN6RO</td>\n",
       "      <td>广州中医药大学教师公寓C栋</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>186.885</td>\n",
       "      <td>113.401641,23.057681</td>\n",
       "      <td>中环东路</td>\n",
       "      <td>0.233331</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B00141KG2Q</td>\n",
       "      <td>广州中医药大学学生宿舍</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>西</td>\n",
       "      <td>331.894</td>\n",
       "      <td>113.399540,23.055736</td>\n",
       "      <td>大学城中环东路232号</td>\n",
       "      <td>0.381008</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B0FFFDZYT9</td>\n",
       "      <td>药王山</td>\n",
       "      <td>风景名胜;风景名胜相关;旅游景点</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>312.2</td>\n",
       "      <td>113.404267,23.058745</td>\n",
       "      <td>大学城香樟路与蒲影路交叉口东北50米</td>\n",
       "      <td>0.343679</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B00140UDXI</td>\n",
       "      <td>广州中医药大学大学城校区国际学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>362.17</td>\n",
       "      <td>113.406256,23.056471</td>\n",
       "      <td>榕萌路</td>\n",
       "      <td>0.415073</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B00141JQ0D</td>\n",
       "      <td>广州中医药大学大学城校区综合楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>343.815</td>\n",
       "      <td>113.405277,23.058331</td>\n",
       "      <td>外环东路广东中医药博物馆</td>\n",
       "      <td>0.268961</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B00141WIUC</td>\n",
       "      <td>广东药科大学-学生第一食堂</td>\n",
       "      <td>餐饮服务;中餐厅;中餐厅</td>\n",
       "      <td>13326492106</td>\n",
       "      <td>南</td>\n",
       "      <td>148.266</td>\n",
       "      <td>113.403200,23.055067</td>\n",
       "      <td>小谷围街广州大学城</td>\n",
       "      <td>0.223734</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B0FFFDZYTE</td>\n",
       "      <td>广州中医药大学大学城校区-国际楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>东</td>\n",
       "      <td>352.882</td>\n",
       "      <td>113.406128,23.056812</td>\n",
       "      <td>大学城外环东路232号广州中医药大学广州赞歌酒店附近</td>\n",
       "      <td>0.275918</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0FFG8TZYR</td>\n",
       "      <td>广州中医药大学普通话培训测试站</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>309.016</td>\n",
       "      <td>113.402506,23.059097</td>\n",
       "      <td>大学城芒果路与大学城香樟路交叉口西南约140米</td>\n",
       "      <td>0.283869</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B00141JQGG</td>\n",
       "      <td>广州中医药大学大学城校区基础医学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>389.364</td>\n",
       "      <td>113.403204,23.059798</td>\n",
       "      <td>大学城外环东路233号</td>\n",
       "      <td>0.30064</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B00141JTFR</td>\n",
       "      <td>广州中医药大学大学城校区基础楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>369.845</td>\n",
       "      <td>113.403125,23.059630</td>\n",
       "      <td>大学城外环东路232号</td>\n",
       "      <td>0.182113</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id                  name                      type  \\\n",
       "0   B00140UDXU        广州中医药大学(大学城校区)            科教文化服务;学校;高等院校   \n",
       "1   B00141JRJV            广州中医药大学大会堂          科教文化服务;会展中心;会展中心   \n",
       "2   B00141SYS5          广东药科大学学生活动中心            科教文化服务;学校;高等院校   \n",
       "3   B0FFFDC8NS             广东药科大学学生会            科教文化服务;学校;高等院校   \n",
       "4   B0FFFDCP1F         广东药科大学学生社团联合会            科教文化服务;学校;高等院校   \n",
       "5   B0FFG9ISNR   广州中医药大学大学城校区教师公寓A号楼               商务住宅;住宅区;宿舍   \n",
       "6   B00141JVHV      广州中医药大学大学城校区-卫管楼              科教文化服务;学校;学校   \n",
       "7   B0FFH6XMU2  广东药科大学学生工作部(处)心理健康中心  医疗保健服务;医疗保健服务场所;医疗保健服务场所   \n",
       "8   B0FFFDCP2M            广东药科大学针灸协会       政府机构及社会团体;社会团体;行业协会   \n",
       "9   B0FFFDAS2Q          广州中医药大学创业实践园            科教文化服务;学校;高等院校   \n",
       "10  B0FFG8TZWO        广州中医药大学马克思主义学院            科教文化服务;学校;高等院校   \n",
       "11  B00141JUXV    广州中医药大学大学城校区人文社科学院            科教文化服务;学校;高等院校   \n",
       "12  B00140HFZN           广州中医药大学第一饭堂              餐饮服务;中餐厅;中餐厅   \n",
       "13  B0FFK6RT3G      广州中医药大学大学城校区青创空间            科教文化服务;学校;高等院校   \n",
       "14  B0FFIORIR8   广州中医药大学大学城校区学生宿舍1号楼               商务住宅;住宅区;宿舍   \n",
       "15  B0FFF5UZYL      广州中医药大学大学城校区-人文楼              科教文化服务;学校;学校   \n",
       "16  B0FFG6LB3E                   大湴村         地名地址信息;普通地名;村庄级地名   \n",
       "17  B0FFJPULWW               广药海洋研究所      科教文化服务;科教文化场所;科教文化场所   \n",
       "18  B00141TWZO       广州中医药大学大学城中医门诊部              医疗保健服务;诊所;诊所   \n",
       "19  B0FFG8U010        广州中医药大学深圳临床医学院            科教文化服务;学校;高等院校   \n",
       "20  B0FFGNN6RO         广州中医药大学教师公寓C栋               商务住宅;住宅区;宿舍   \n",
       "21  B00141KG2Q           广州中医药大学学生宿舍               商务住宅;住宅区;宿舍   \n",
       "22  B0FFFDZYT9                   药王山          风景名胜;风景名胜相关;旅游景点   \n",
       "23  B00140UDXI      广州中医药大学大学城校区国际学院            科教文化服务;学校;高等院校   \n",
       "24  B00141JQ0D       广州中医药大学大学城校区综合楼              科教文化服务;学校;学校   \n",
       "25  B00141WIUC         广东药科大学-学生第一食堂              餐饮服务;中餐厅;中餐厅   \n",
       "26  B0FFFDZYTE      广州中医药大学大学城校区-国际楼              科教文化服务;学校;学校   \n",
       "27  B0FFG8TZYR       广州中医药大学普通话培训测试站            科教文化服务;学校;高等院校   \n",
       "28  B00141JQGG     广州中医药大学大学城校区基础医学院            科教文化服务;学校;高等院校   \n",
       "29  B00141JTFR       广州中医药大学大学城校区基础楼              科教文化服务;学校;学校   \n",
       "\n",
       "                          tel direction distance              location  \\\n",
       "0   020-39358050;020-39358233        东北  297.221  113.404592,23.058369   \n",
       "1                          []        东北  266.086  113.404911,23.057614   \n",
       "2                          []        西南  78.5893  113.402223,23.055786   \n",
       "3                          []        西南  78.5893  113.402223,23.055786   \n",
       "4                          []        西南  78.5893  113.402223,23.055786   \n",
       "5                          []        西北  124.777  113.402107,23.057295   \n",
       "6                          []         北  269.431  113.403311,23.058686   \n",
       "7                          []        西南    78.26  113.402223,23.055790   \n",
       "8                          []        西南  100.381  113.401954,23.055761   \n",
       "9                 13059130491         西  182.352  113.400943,23.056451   \n",
       "10                         []         北  319.189  113.402315,23.059171   \n",
       "11                         []         北  327.519  113.402479,23.059262   \n",
       "12   13509012621;020-39356188         西  150.692  113.401334,23.056783   \n",
       "13                         []         西   175.23  113.401013,23.056453   \n",
       "14                         []         西  187.058  113.401039,23.056986   \n",
       "15                         []         北  318.623  113.402316,23.059166   \n",
       "16                         []        西南  236.507  113.401099,23.054809   \n",
       "17                         []         南  188.755  113.402123,23.054719   \n",
       "18                         []         西  141.535  113.401365,23.056069   \n",
       "19                         []         北  346.202  113.403350,23.059384   \n",
       "20                         []        西北  186.885  113.401641,23.057681   \n",
       "21                         []         西  331.894  113.399540,23.055736   \n",
       "22                         []        东北    312.2  113.404267,23.058745   \n",
       "23                         []         东   362.17  113.406256,23.056471   \n",
       "24                         []        东北  343.815  113.405277,23.058331   \n",
       "25                13326492106         南  148.266  113.403200,23.055067   \n",
       "26                         []         东  352.882  113.406128,23.056812   \n",
       "27                         []         北  309.016  113.402506,23.059097   \n",
       "28                         []         北  389.364  113.403204,23.059798   \n",
       "29                         []         北  369.845  113.403125,23.059630   \n",
       "\n",
       "                           address poiweight businessarea  \n",
       "0                      大学城外环东路232号  0.677618           []  \n",
       "1                      大学城外环东路232号  0.188565           []  \n",
       "2                          大学城中二横路   0.27583           []  \n",
       "3                         大学城广药路附近   0.28068           []  \n",
       "4                         大学城广药路附近   0.28068           []  \n",
       "5                      大学城中环东路77附近  0.246851           []  \n",
       "6                      大学城外环东路232号  0.209138           []  \n",
       "7            大学城中环东路与玉兰路交叉口西南约200米  0.188695           []  \n",
       "8               大学城广东药科大学学生活动中心206  0.141431           []  \n",
       "9         大学城广中医路与大学城中环东路交叉口南约220米   0.28068           []  \n",
       "10        大学城中环东路与大学城广中医路交叉口东约120米  0.283869           []  \n",
       "11                   广州大学城外环东路232号   0.27583           []  \n",
       "12        大学城中环东路123号广州中医药大学二饭1-3层   0.25528           []  \n",
       "13        大学城广中医路与大学城中环东路交叉口南约220米  0.289618           []  \n",
       "14  大学城广中医路广州中医药大学大学城校区西北2门东南侧约70米  0.242906           []  \n",
       "15                     大学城外环东路232号  0.278599           []  \n",
       "16                             番禺区  0.395663           []  \n",
       "17                        大学城广药路附近  0.191617           []  \n",
       "18                   广州大学城外环东路232号  0.222269           []  \n",
       "19          大学城香樟路与大学城芒果路交叉口西南约60米  0.283869           []  \n",
       "20                            中环东路  0.233331           []  \n",
       "21                     大学城中环东路232号  0.381008           []  \n",
       "22              大学城香樟路与蒲影路交叉口东北50米  0.343679           []  \n",
       "23                             榕萌路  0.415073           []  \n",
       "24                    外环东路广东中医药博物馆  0.268961           []  \n",
       "25                       小谷围街广州大学城  0.223734           []  \n",
       "26      大学城外环东路232号广州中医药大学广州赞歌酒店附近  0.275918           []  \n",
       "27         大学城芒果路与大学城香樟路交叉口西南约140米  0.283869           []  \n",
       "28                     大学城外环东路233号   0.30064           []  \n",
       "29                     大学城外环东路232号  0.182113           []  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois'])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3339813b",
   "metadata": {},
   "source": [
    "## 尝试搜索POI2.0 接口"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "8f1796a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 地理编码\n",
    "# 1.调用requests 模块（Google Chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2.请求方法： GET       \n",
    "\n",
    "# 3.URL：https://restapi.amap.com/v5/place/text?parameters\n",
    "geo_url = \"https://restapi.amap.com/v5/place/text?parameters\"\n",
    "\n",
    "# 4.准备参数，用于交换数据payload\n",
    "# payload用字典的形式来写\n",
    "payload = {\n",
    "    \"key\":\"e3bd629a241fbf772c12714d669d83aa\",\n",
    "    \"keywords\":\"广州中医药大学\"\n",
    "}\n",
    "\n",
    "# 5.发起请求\n",
    "r = requests.get(url=geo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "9a4a9d87",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "d98d84d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '广州中医药大学',\n",
       "   'id': 'B0FFK968EB',\n",
       "   'location': '113.406983,23.061714',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'typecode': '141201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '大学城广中医路与大学城芒果路交叉口东南50米',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113'},\n",
       "  {'name': '广州中医药大学(大学城校区)',\n",
       "   'id': 'B00140UDXU',\n",
       "   'location': '113.404592,23.058369',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'typecode': '141201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '大学城外环东路232号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113'},\n",
       "  {'name': '广州中医药大学(三元里校区)',\n",
       "   'id': 'B00141OISJ',\n",
       "   'location': '113.26713,23.156024',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'typecode': '141201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '白云区',\n",
       "   'address': '机场路12号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440111'},\n",
       "  {'name': '广州中医药大学',\n",
       "   'id': 'B0FFM630SD',\n",
       "   'location': '113.217213,23.071008',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'typecode': '141201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '荔湾区',\n",
       "   'address': 'S113(龙溪大道)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440103'},\n",
       "  {'name': '广州中医药大学第一附属医院(机场路院区)',\n",
       "   'id': 'B00140201C',\n",
       "   'location': '113.264493,23.15729',\n",
       "   'type': '医疗保健服务;综合医院;三级甲等医院',\n",
       "   'typecode': '090101',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '白云区',\n",
       "   'address': '机场路16号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440111'},\n",
       "  {'name': '广州中医药大学大学城校区-办公楼',\n",
       "   'id': 'B00140UDXQ',\n",
       "   'location': '113.407016,23.060493',\n",
       "   'type': '科教文化服务;学校;学校',\n",
       "   'typecode': '141200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '大学城外环东路232号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113'},\n",
       "  {'name': '广州中医药大学办公大楼',\n",
       "   'id': 'B00141NMKM',\n",
       "   'location': '113.266370,23.154966',\n",
       "   'type': '科教文化服务;学校;学校',\n",
       "   'typecode': '141200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '白云区',\n",
       "   'address': '机场路12号大院',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440111'},\n",
       "  {'name': '广州中医药大学第一附属医院白云医院',\n",
       "   'id': 'B0FFH6OZ2E',\n",
       "   'location': '113.294383,23.33818',\n",
       "   'type': '医疗保健服务;综合医院;综合医院',\n",
       "   'typecode': '090100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '白云区',\n",
       "   'address': '人和镇鹤龙七路2号(人和地铁站B口步行280米)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440111'},\n",
       "  {'name': '广州中医药大学大学城校区医工楼',\n",
       "   'id': 'B00141JQ61',\n",
       "   'location': '113.405710,23.061040',\n",
       "   'type': '科教文化服务;学校;学校',\n",
       "   'typecode': '141200',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '外环东路',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113'},\n",
       "  {'name': '广州中医药大学教学基地',\n",
       "   'id': 'B00140W4UW',\n",
       "   'location': '113.293498,23.013609',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'typecode': '141201',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '石北工业路339号附近',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113'}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95337170",
   "metadata": {},
   "source": [
    "## 获取中餐厅、西餐厅、快餐厅的信息(图片、内容等)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "27fca6f4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.404876,23.058442'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import requests\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "payload = {\n",
    "    \"key\":\"b0121f143057c2f0c3607e48fe21bac9\",\n",
    "    \"address\":\"广东省番禺区广州中医药大学\"\n",
    "}\n",
    "r = requests.get(url=geo_url, params=payload)\n",
    "广州中医药大学_location = r.json()['geocodes'][0]['location']\n",
    "广州中医药大学_location\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "df93d051",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '861',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '大学城中环东路123号',\n",
       "   'distance': '300',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '多莱客汉堡',\n",
       "   'location': '113.402059,23.057688',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF643NQ'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城中环东路与玉兰路交叉口西约180米',\n",
       "   'distance': '398',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '0.3',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '麦客汉堡(大学城店)',\n",
       "   'location': '113.401444,23.056759',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0H1MLZRNB'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广药路与大学城中环东路交叉口西约160米',\n",
       "   'distance': '404',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '24.00',\n",
       "    'opentime2': '08:00-18:00',\n",
       "    'rating': '4.1',\n",
       "    'open_time': '08:00-18:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4137373d52cfd72cee36a11f2ae8afc8'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '烧腊(广药一饭店)',\n",
       "   'location': '113.403349,23.055093',\n",
       "   'tel': '13538984683;15915764959',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFI5EWVR'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路123号广州中医药大学二饭1-3层',\n",
       "   'distance': '407',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '10.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f2dcbad0ee1f93daea4c3b60a4df574'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/44f3e9bd3a439edee3f066e1aed96e0d'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b8e73e2195bcdc5e164339013abc8294'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学第一饭堂',\n",
       "   'location': '113.401334,23.056783',\n",
       "   'tel': '020-39356188;13509012621',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140HFZN'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路与玉兰路交叉口西南约200米',\n",
       "   'distance': '407',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.5',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学大学城校区一饭堂',\n",
       "   'location': '113.401572,23.056396',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFM1SQJK'},\n",
       "  {'parent': 'B00140VATW',\n",
       "   'address': '小谷围街广州大学城',\n",
       "   'distance': '413',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '12.00',\n",
       "    'opentime2': '06:00-14:00；16:00-20:00',\n",
       "    'rating': '4.3',\n",
       "    'open_time': '06:00-14:00 16:00-20:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/edc1a132acb01061b17231c6665812ef'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/46404ce460cc89b9ce3255ad1d13aa48'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d9df65dd2bd21aca146abc0ee95a31fd'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东药科大学-学生第一食堂',\n",
       "   'location': '113.403200,23.055067',\n",
       "   'tel': '13326492106',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141WIUC'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广中医路与大学城中环东路交叉口南约200米',\n",
       "   'distance': '422',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '风味餐厅',\n",
       "   'location': '113.401218,23.056689',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIIN6OM'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '大学城华工北路68华工·大学城中心酒店',\n",
       "   'distance': '571',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '79.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '3.9',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '3',\n",
       "   'adname': '番禺区',\n",
       "   'name': '饮和居风味餐厅',\n",
       "   'location': '113.406282,23.053470',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141JTL3'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '华工北路68号华南理工大学',\n",
       "   'distance': '592',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.4',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '312',\n",
       "   'adname': '番禺区',\n",
       "   'name': '华工·大学城中心酒店中餐厅',\n",
       "   'location': '113.406654,23.053380',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141JUJI'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '华工北路68号华工·大学城中心酒店附楼1-2层',\n",
       "   'distance': '592',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.1',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '312',\n",
       "   'adname': '番禺区',\n",
       "   'name': '华工大学城中心酒店宴会厅',\n",
       "   'location': '113.406640,23.053370',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGBIZTY'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广药路',\n",
       "   'distance': '691',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '8.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/86e446a21176ebd722e8001f69f766ff'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/59644ab378b7279ae2aaed56368754c4'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/66f5caabbf987cccdbaddc79b68883c9'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广药第二饭堂',\n",
       "   'location': '113.400207,23.053952',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHS3RSJ'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路123号广州中医药大学二饭1-3层',\n",
       "   'distance': '692',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '4.6',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cd83f9b326d67849f47468b495cfd40e'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学第2食堂',\n",
       "   'location': '113.398871,23.055584',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF6UGUK'},\n",
       "  {'parent': 'B00140VATW',\n",
       "   'address': '广东药科大学大学城校区生活区内',\n",
       "   'distance': '697',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '4.2',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/51e50ed8535d13cafd5554a8e7654e5c'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/dcce0f2bdea798e041c635e04f80fe67'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fd94fae86409c72314c0b6ec20922580'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东药科大学第二食堂',\n",
       "   'location': '113.400005,23.054065',\n",
       "   'tel': '18929512105',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHR4LNF'},\n",
       "  {'parent': [],\n",
       "   'address': '小谷围街大学城广工二路东2食堂2层',\n",
       "   'distance': '713',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '麥德堡(广工二饭堂店)',\n",
       "   'location': '113.400090,23.053791',\n",
       "   'tel': '13724441818',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIJ3HFV'},\n",
       "  {'parent': [],\n",
       "   'address': '外环东路382号',\n",
       "   'distance': '778',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.6',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/adeec4ec-acd0-4d7b-9842-8605e75d7e0d.jpg'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2a8796a3bc88cbfc3f32311a9e537a43'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '华南理工大学南校区第二学生食堂',\n",
       "   'location': '113.403496,23.051567',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B00140UDXT'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广东外语外贸大学第二饭堂',\n",
       "   'distance': '800',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': '10:00-13:00；16:00-19:30',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '10:00-13:00 16:00-19:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f28da7c3e1ca65133c1568b720e9d287'},\n",
       "    {'title': '环境',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4d0f4123096c44925b665d16eb37a4dc'},\n",
       "    {'title': '环境',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/30c34f9df671c897c3cf4c05c3f385d6'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '大学城广东外语外贸大学二饭博雅园',\n",
       "   'location': '113.397597,23.061058',\n",
       "   'tel': '18665663101',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141OD3I'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广外西路与贝岗村大街交叉口东北约200米',\n",
       "   'distance': '815',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.8',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东外语外贸大学南校区第二食堂',\n",
       "   'location': '113.397414,23.061006',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFM1Z2ZL'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广外西路与贝岗村大街交叉口东北约200米',\n",
       "   'distance': '820',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.1',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东外语外贸大学大学城校区第2食堂',\n",
       "   'location': '113.397357,23.060976',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG8U01F'},\n",
       "  {'parent': [],\n",
       "   'address': '南田坊石桥新街17-2号',\n",
       "   'distance': '854',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '44.00',\n",
       "    'opentime2': '11:00-23:30',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '11:00-23:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5fe289efaba773b44b1316673ec94f32'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/579aa6449861349ff3a8ea4593f103e8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/84cd52b1bb783a1cb6c8002d98ad91c9'}],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '黄埔区',\n",
       "   'name': '川香烤鱼(金洲南路)',\n",
       "   'location': '113.406888,23.065890',\n",
       "   'tel': '13430322336',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG2OHML'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城外环东路382号华南理工大学大学城校区小型公建B2层',\n",
       "   'distance': '870',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '22.00',\n",
       "    'opentime2': '07:00-23:00',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '07:00-23:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f00b57db0e2fe64fdc49325dc023400'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8f1634ffcbd6c6da649169684a855d99'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f0d5d0a3b7c0cb6bbe0e22490f55a884'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '真功夫(大学城华南理工店)',\n",
       "   'location': '113.402277,23.051001',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFJPEASR'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "around_url = 'https://restapi.amap.com/v3/place/around?parameters'\n",
    "\n",
    "payload = {\n",
    "    \"key\":\"b0121f143057c2f0c3607e48fe21bac9\",\n",
    "    \"location\":广州中医药大学_location,\n",
    "    \"keywords\":\"美食\"\n",
    "}\n",
    "r = requests.get(around_url,params=payload)\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "f3320f78",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "82dfe7b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '861',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '大学城中环东路123号',\n",
       "   'distance': '300',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '多莱客汉堡',\n",
       "   'location': '113.402059,23.057688',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF643NQ'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城中环东路与玉兰路交叉口西约180米',\n",
       "   'distance': '398',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '0.3',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '麦客汉堡(大学城店)',\n",
       "   'location': '113.401444,23.056759',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0H1MLZRNB'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广药路与大学城中环东路交叉口西约160米',\n",
       "   'distance': '404',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '24.00',\n",
       "    'opentime2': '08:00-18:00',\n",
       "    'rating': '4.1',\n",
       "    'open_time': '08:00-18:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4137373d52cfd72cee36a11f2ae8afc8'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '烧腊(广药一饭店)',\n",
       "   'location': '113.403349,23.055093',\n",
       "   'tel': '13538984683;15915764959',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFI5EWVR'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路123号广州中医药大学二饭1-3层',\n",
       "   'distance': '407',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '10.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f2dcbad0ee1f93daea4c3b60a4df574'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/44f3e9bd3a439edee3f066e1aed96e0d'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b8e73e2195bcdc5e164339013abc8294'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学第一饭堂',\n",
       "   'location': '113.401334,23.056783',\n",
       "   'tel': '020-39356188;13509012621',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140HFZN'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路与玉兰路交叉口西南约200米',\n",
       "   'distance': '407',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.5',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学大学城校区一饭堂',\n",
       "   'location': '113.401572,23.056396',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFM1SQJK'},\n",
       "  {'parent': 'B00140VATW',\n",
       "   'address': '小谷围街广州大学城',\n",
       "   'distance': '413',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '12.00',\n",
       "    'opentime2': '06:00-14:00；16:00-20:00',\n",
       "    'rating': '4.3',\n",
       "    'open_time': '06:00-14:00 16:00-20:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/edc1a132acb01061b17231c6665812ef'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/46404ce460cc89b9ce3255ad1d13aa48'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d9df65dd2bd21aca146abc0ee95a31fd'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东药科大学-学生第一食堂',\n",
       "   'location': '113.403200,23.055067',\n",
       "   'tel': '13326492106',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141WIUC'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广中医路与大学城中环东路交叉口南约200米',\n",
       "   'distance': '422',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '风味餐厅',\n",
       "   'location': '113.401218,23.056689',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIIN6OM'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '大学城华工北路68华工·大学城中心酒店',\n",
       "   'distance': '571',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '79.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '3.9',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '3',\n",
       "   'adname': '番禺区',\n",
       "   'name': '饮和居风味餐厅',\n",
       "   'location': '113.406282,23.053470',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141JTL3'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '华工北路68号华南理工大学',\n",
       "   'distance': '592',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.4',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '312',\n",
       "   'adname': '番禺区',\n",
       "   'name': '华工·大学城中心酒店中餐厅',\n",
       "   'location': '113.406654,23.053380',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141JUJI'},\n",
       "  {'parent': 'B00140UOF8',\n",
       "   'address': '华工北路68号华工·大学城中心酒店附楼1-2层',\n",
       "   'distance': '592',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.1',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '312',\n",
       "   'adname': '番禺区',\n",
       "   'name': '华工大学城中心酒店宴会厅',\n",
       "   'location': '113.406640,23.053370',\n",
       "   'tel': '020-39388888',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGBIZTY'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广药路',\n",
       "   'distance': '691',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '8.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/86e446a21176ebd722e8001f69f766ff'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/59644ab378b7279ae2aaed56368754c4'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/66f5caabbf987cccdbaddc79b68883c9'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广药第二饭堂',\n",
       "   'location': '113.400207,23.053952',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHS3RSJ'},\n",
       "  {'parent': 'B00140UDXU',\n",
       "   'address': '大学城中环东路123号广州中医药大学二饭1-3层',\n",
       "   'distance': '692',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '4.6',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cd83f9b326d67849f47468b495cfd40e'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广州中医药大学第2食堂',\n",
       "   'location': '113.398871,23.055584',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF6UGUK'},\n",
       "  {'parent': 'B00140VATW',\n",
       "   'address': '广东药科大学大学城校区生活区内',\n",
       "   'distance': '697',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '4.2',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/51e50ed8535d13cafd5554a8e7654e5c'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/dcce0f2bdea798e041c635e04f80fe67'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fd94fae86409c72314c0b6ec20922580'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东药科大学第二食堂',\n",
       "   'location': '113.400005,23.054065',\n",
       "   'tel': '18929512105',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHR4LNF'},\n",
       "  {'parent': [],\n",
       "   'address': '小谷围街大学城广工二路东2食堂2层',\n",
       "   'distance': '713',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '麥德堡(广工二饭堂店)',\n",
       "   'location': '113.400090,23.053791',\n",
       "   'tel': '13724441818',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFIJ3HFV'},\n",
       "  {'parent': [],\n",
       "   'address': '外环东路382号',\n",
       "   'distance': '778',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.6',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/adeec4ec-acd0-4d7b-9842-8605e75d7e0d.jpg'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2a8796a3bc88cbfc3f32311a9e537a43'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '华南理工大学南校区第二学生食堂',\n",
       "   'location': '113.403496,23.051567',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B00140UDXT'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广东外语外贸大学第二饭堂',\n",
       "   'distance': '800',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '11.00',\n",
       "    'opentime2': '10:00-13:00；16:00-19:30',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '10:00-13:00 16:00-19:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f28da7c3e1ca65133c1568b720e9d287'},\n",
       "    {'title': '环境',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4d0f4123096c44925b665d16eb37a4dc'},\n",
       "    {'title': '环境',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/30c34f9df671c897c3cf4c05c3f385d6'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '大学城广东外语外贸大学二饭博雅园',\n",
       "   'location': '113.397597,23.061058',\n",
       "   'tel': '18665663101',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141OD3I'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广外西路与贝岗村大街交叉口东北约200米',\n",
       "   'distance': '815',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.8',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东外语外贸大学南校区第二食堂',\n",
       "   'location': '113.397414,23.061006',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFM1Z2ZL'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城广外西路与贝岗村大街交叉口东北约200米',\n",
       "   'distance': '820',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.1',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '广东外语外贸大学大学城校区第2食堂',\n",
       "   'location': '113.397357,23.060976',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG8U01F'},\n",
       "  {'parent': [],\n",
       "   'address': '南田坊石桥新街17-2号',\n",
       "   'distance': '854',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '44.00',\n",
       "    'opentime2': '11:00-23:30',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '11:00-23:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5fe289efaba773b44b1316673ec94f32'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/579aa6449861349ff3a8ea4593f103e8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/84cd52b1bb783a1cb6c8002d98ad91c9'}],\n",
       "   'typecode': '050118',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '黄埔区',\n",
       "   'name': '川香烤鱼(金洲南路)',\n",
       "   'location': '113.406888,23.065890',\n",
       "   'tel': '13430322336',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFG2OHML'},\n",
       "  {'parent': [],\n",
       "   'address': '大学城外环东路382号华南理工大学大学城校区小型公建B2层',\n",
       "   'distance': '870',\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '22.00',\n",
       "    'opentime2': '07:00-23:00',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '07:00-23:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9f00b57db0e2fe64fdc49325dc023400'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8f1634ffcbd6c6da649169684a855d99'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f0d5d0a3b7c0cb6bbe0e22490f55a884'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '番禺区',\n",
       "   'name': '真功夫(大学城华南理工店)',\n",
       "   'location': '113.402277,23.051001',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFJPEASR'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "385b248b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "214.057px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
